package com.hxzy.shop.feign.marketing;

/**
 * @ Author     ：dididi
 * @ Date       ：Created in 14:07 2023/8/2
 * @ Modified By：
 */

import com.github.pagehelper.PageInfo;
import com.hxzy.shop.dto.marketing.dto.PageRequest;
import com.hxzy.shop.dto.marketing.dto.req.*;
import com.hxzy.shop.dto.marketing.dto.resp.DistributionDrugListResp;
import com.hxzy.shop.dto.marketing.dto.resp.DistributionDrugResp;
import com.hxzy.shop.dto.marketing.dto.resp.DistributionGlobalAndBindRuleResp;
import com.hxzy.shop.entity.DistributionLevel;
import com.hxzy.shop.entity.DistributorImage;
import com.hxzy.shop.vo.Result;
import io.swagger.annotations.ApiOperation;
import org.junit.jupiter.params.shadow.com.univocity.parsers.annotations.Validate;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;

import java.util.List;

/**
 * 在nacos中调用对应的服务名
 *
 */
@FeignClient(value = "marketing")
public interface MarketingFeign {

    @ApiOperation(value = "分销等级列表")
    @PostMapping(value = "/distribution/levelList")
    Result<List<DistributionLevel>> levelList();

    @ApiOperation(value = "全球分销规则")
    @PostMapping(value = "/distribution/globalRule")
    Result<DistributionGlobalAndBindRuleResp> globalRule();
    @ApiOperation(value = "编辑分销等级")
    @PostMapping(value = "/distribution/levelSave")
    Result<Object> levelSave(@RequestBody List<DistributionLevelSaveReq> reqs);
    @PostMapping(value = "/distribution/globalRule/update")
    @ApiOperation(value = "编辑分销全局规则")
    Result<Object> globalRuleUpdate(@RequestBody DistributionGlobalRuleUpdateReq req);

    @PostMapping(value = "/distribution/drugList")
    @ApiOperation(value = "分销药品列表")
    Result<PageInfo<DistributionDrugListResp>> drugList(@RequestBody DistributionDrugPageReq req);
    @PostMapping(value = "/distribution/noSelect/drugList")
    @ApiOperation(value = "分销未选药品列表")
    Result<PageInfo<DistributionDrugResp>> noSelectdrugList(@RequestBody DistributionDrugNoSelectReq req);
    @PostMapping(value = "/distribution/drug/update")
    @ApiOperation(value = "修改分销药品")
    Result<Object> updateDistributionDrug(@RequestBody @Validated UpdateDistributionDrugReq req);
    @PostMapping(value = "/distribution/drug/add")
    @ApiOperation(value = "添加分销药品")
    Result<Object> addDistributionDrug(@RequestBody AddDistributionDrugReq req);

    @PostMapping(value = "/distribution/drug/delete")
    @ApiOperation(value = "删除分销药品")
    Result<Object> deleteDistributionDrug(@RequestBody @Validated DeleteDistributionDrugReq req);
    @PostMapping(value = "/distribute/imageList")
    @ApiOperation(value = "分销推广图列表")
    Result<PageInfo<DistributorImage>> imageList(@RequestBody PageRequest req);
    @PostMapping(value = "/distribute/addImage")
    @ApiOperation(value = "新增分销推广图片")
    Result<Object> addImage(@RequestBody AddImageReq req);
}
